<template>
	<view class="content">
		<image mode="widthFix"
			src="http://p0.meituan.net/ugcpic/28b6847bb6569bcfa01c6566ae8c4012_1_b8eb8f1aa8e3ef7a_1_vCZ3FkX6KyBJmIohC6Ohx8jxcMxT1rzH/qbEYgcUm2vm/D8JzMr0B5GnXkQJ/jiz6NjzTxgAWJMjUrJELftxGWSdu4Cp8H1Rj/pdZh8+Hz8="
			class="top-bg"></image>
		<view class="detail-block">
			<view class="info-block">
				<image mode="aspectFill"
					src="http://p0.meituan.net/ugcpic/28b6847bb6569bcfa01c6566ae8c4012_1_b8eb8f1aa8e3ef7a_1_vCZ3FkX6KyBJmIohC6Ohx8jxcMxT1rzH/qbEYgcUm2vm/D8JzMr0B5GnXkQJ/jiz6NjzTxgAWJMjUrJELftxGWSdu4Cp8H1Rj/pdZh8+Hz8="
					class="photo"></image>
				<view class="info">
					<view class="name">{{data.name}}</view>
					<view class="score-block">
						<view class="score">{{data.score}}</view>
						<view class="selling-season">季售{{data.sellingSeason}}</view>
					</view>
					<view class="category-block">
						<view class="category">{{data.category}}</view>
						<view class="business-area">{{data.businessArea}}</view>
						<view class="position">
							<view class="iconfont icon-dingweixiao"></view>{{data.position}}
						</view>
					</view>
					<view class="ranking-block">
						<view class="ranking">{{data.ranking}}</view>
					</view>
				</view>
			</view>
			<view class="business-hours">
				<view class="date">营业中 09:30 - 22:00</view>
			</view>
			<view class="position-block">
				<view class="position">
					<view class="iconfont icon-dingweixiao"></view>肃州区民意街2号
				</view>
				<view class="navigator-block">
					<view class="iconfont icon-daohang"></view>
					<view class="label">到这去</view>
				</view>
			</view>
		</view>
		<view class="title">套餐</view>
		<view class="list-block">
			<navigator hover-class="none" url="/pages/specialty/detail" v-for="(item,index) in data.goods" :key="item.id"
				class="list-item">
				<image :src="item.photo" mode="aspectFill" class="photo"></image>
				<view class="info-block">
					<view class="name">{{item.name}}</view>
					<view class="other">{{item.name}}</view>
					<view class="price-block">
						<view class="discount-prices">￥{{item.discountPrices}}</view>
						<view v-if="item.originalPrice" class="original-price">￥{{item.originalPrice}}</view>
					</view>
				</view>
				<view class="booking-block">
					<view class="booking-btn btn1">购买</view>
					<view class="sold">已售{{item.sold}}</view>
				</view>
			</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: {
					id: 1,
					photo: 'http://p0.meituan.net/ugcpic/28b6847bb6569bcfa01c6566ae8c4012_1_b8eb8f1aa8e3ef7a_1_vCZ3FkX6KyBJmIohC6Ohx8jxcMxT1rzH/qbEYgcUm2vm/D8JzMr0B5GnXkQJ/jiz6NjzTxgAWJMjUrJELftxGWSdu4Cp8H1Rj/pdZh8+Hz8=',
					name: '酒泉牌夜光杯专卖店（民意街直营店）',
					position: '肃州区民意街2号',
					score:4.8,
					sellingSeason:20,
					category:'特产',
					businessArea:'民意街',
					goods: [{
							id: 4,
							photo: 'http://p0.meituan.net/ugcpic/28b6847bb6569bcfa01c6566ae8c4012_1_b8eb8f1aa8e3ef7a_1_vCZ3FkX6KyBJmIohC6Ohx8jxcMxT1rzH/qbEYgcUm2vm/D8JzMr0B5GnXkQJ/jiz6NjzTxgAWJMjUrJELftxGWSdu4Cp8H1Rj/pdZh8+Hz8=',
							name: '中华老字号夜光杯1',
							discountPrices: 323,
							sold:12,
						},
						{
							id: 5,
							photo: 'http://p0.meituan.net/ugcpic/28b6847bb6569bcfa01c6566ae8c4012_1_b8eb8f1aa8e3ef7a_1_vCZ3FkX6KyBJmIohC6Ohx8jxcMxT1rzH/qbEYgcUm2vm/D8JzMr0B5GnXkQJ/jiz6NjzTxgAWJMjUrJELftxGWSdu4Cp8H1Rj/pdZh8+Hz8=',
							name: '中华老字号夜光杯2',
							discountPrices: 311,
							sold:12,
						},
						{
							id: 6,
							photo: 'http://p0.meituan.net/ugcpic/28b6847bb6569bcfa01c6566ae8c4012_1_b8eb8f1aa8e3ef7a_1_vCZ3FkX6KyBJmIohC6Ohx8jxcMxT1rzH/qbEYgcUm2vm/D8JzMr0B5GnXkQJ/jiz6NjzTxgAWJMjUrJELftxGWSdu4Cp8H1Rj/pdZh8+Hz8=',
							name: '中华老字号夜光杯3',
							discountPrices: 389,
							sold:12,
						},
					]
				},
			}
		},
		mounted() {

		}
	}
</script>

<style lang="scss" scoped>
	.content {
		display: flex;
		flex-direction: column;
		background: #F4F4F4;
		min-height: 100vh;

		.top-bg {
			width: 100%;
			height: auto;
			filter: blur(5px);
		}

		.detail-block {
			position: relative;
			border-radius: 5px;
			background: #fff;
			width: calc(100% - 80rpx);
			margin: 0 auto;
			margin-top: -120rpx;
			padding: 30rpx;
			padding-bottom: 0;
			display: flex;
			flex-direction: column;

			.info-block {
				display: flex;
				flex-direction: row;
				padding-bottom: 30rpx;
				border-bottom: 1px solid #efefef;

				.photo {
					width: 180rpx;
					height: 180rpx;
					border-radius: 10rpx;
					margin-right: 20rpx;
				}

				.info {
					width: calc(100% - 200rpx);
					display: flex;
					flex-direction: column;
					padding-bottom: 10rpx;

					.name {
						font-size: 34rpx;
						font-weight: bold;
					}

					.score-block {
						display: flex;
						align-items: center;
						margin-top: 4rpx;

						.score {
							flex-grow: 0;
							font-size: 34rpx;
							font-weight: bold;
							margin-right: 14rpx;
							background: url('@/static/bottom.png') no-repeat;
							background-position: center 85%;
							background-size: 80%;
						}

						.capite {
							flex-grow: 0;
							font-size: 26rpx;
							color: $color-secondary-text;
						}

						.selling-season {
							flex-grow: 1;
							font-size: 26rpx;
							color: $color-secondary-text;
							text-align: right;
						}
					}

					.category-block {
						display: flex;
						align-items: center;
						font-size: 24rpx;
						color: $color-secondary-text;
						margin-top: 4rpx;

						.category {
							flex-grow: 0;
							margin-right: 10rpx;
						}

						.business-area {
							flex-grow: 0;
						}

						.position {
							flex-grow: 1;
							display: flex;
							flex-direction: row;
							align-items: center;
							justify-content: flex-end;

							.iconfont {
								margin-right: 10rpx;
							}
						}
					}

					.ranking-block {
						display: flex;
						margin-top: 4rpx;

						.ranking {
							font-size: 24rpx;
							background: #FCF5E1;
							color: #dba81c;
							padding: 0 4rpx;
							border-radius: 8rpx;
						}
					}
				}
			}

			.business-hours {
				border-bottom: 1px solid #efefef;
				display: flex;
				flex-direction: row;
				align-items: center;
				height: 80rpx;
				font-size: 28rpx;

				.date {
					font-weight: bold;
					flex-grow: 1;
				}
			}

			.position-block {
				display: flex;
				flex-direction: row;
				align-items: center;
				font-size: 28rpx;
				height: 120rpx;

				.position {
					display: flex;
					flex-grow: 1;
					align-items: center;

					.iconfont {
						margin-right: 8rpx;
					}
				}

				.navigator-block {
					flex-grow: 0;
					display: flex;
					flex-direction: column;
					justify-content: center;
					align-items: center;
					font-size: 24rpx;

					.iconfont {
						background: #efefef;
						font-size: 34rpx;
						border-radius: 50%;
					}
				}
			}
		}

		.title {
			width: calc(100% - 80rpx);
			margin: 20rpx auto;
			font-weight: bold;
			border-left: 3px solid $color-primary;
			font-size: 32rpx;
			height: 34rpx;
			padding-left: 20rpx;
			display: flex;
			align-items: center;
		}

		.list-block {
			width: calc(100% - 80rpx);
			margin: 0 auto;
			display: flex;
			flex-direction: column;

			.list-item {
				display: flex;
				flex-direction: row;
				padding: 30rpx;
				background: #fff;
				border-bottom: 1px solid #efefef;
				margin-bottom: 20rpx;
				border-radius: 10rpx;

				.photo {
					width: 180rpx;
					height: 180rpx;
					border-radius: 10rpx;
					margin-right: 20rpx;
				}

				.info-block {
					width: calc(100% - 320rpx);
					display: flex;
					flex-direction: column;

					.name {
						font-weight: bold;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

					.other {
						font-size: 26rpx;
						color: $color-secondary-text;
						margin: 20rpx 0;
					}

					.price-block {
						display: flex;
						flex-direction: row;
						align-items: center;

						.discount-prices {
							font-weight: bold;
							color: $color-danger;
						}

						.original-price {
							text-decoration: line-through;
							font-size: 24rpx;
							color: $color-secondary-text;
						}
					}
				}

				.booking-block {
					display: flex;
					flex-direction: column;
					align-items: center;
					justify-content: center;

					.booking-btn {
						width: 120rpx;
						height: 60rpx;
						font-size: 28rpx;
					}

					.sold {
						margin-top: 20rpx;
						display: flex;
						flex-direction: row;
						font-size: 24rpx;
						color: $color-secondary-text;
					}
				}
			}

			.list-item:last-child {
				margin-bottom: 0;
				border-bottom: none;
			}
		}
	}
</style>
